using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace LigerUi.MVC.DataModel.EntityClasses.Models.Mapping
{
    public class Sys_ButtonClassMap : EntityTypeConfiguration<Sys_ButtonClass>
    {
        public Sys_ButtonClassMap()
        {
            // Primary Key
            this.HasKey(t => t.BtnClassID);

            // Properties
            this.Property(t => t.BtnClass)
                .HasMaxLength(50);

            this.Property(t => t.BtnName)
                .HasMaxLength(50);

            this.Property(t => t.Remark)
                .HasMaxLength(4000);

            this.Property(t => t.MenuNo)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Sys_ButtonClass");
            this.Property(t => t.BtnClassID).HasColumnName("BtnClassID");
            this.Property(t => t.BtnClass).HasColumnName("BtnClass");
            this.Property(t => t.BtnName).HasColumnName("BtnName");
            this.Property(t => t.Remark).HasColumnName("Remark");
            this.Property(t => t.MenuNo).HasColumnName("MenuNo");
        }
    }
}
